package com.tanhua.common.exception;

import com.tanhua.common.vo.ErrorResult;
import lombok.Data;

/*  业务异常类
*       自定义异常类 针对业务错误之间抛出业务异常即可
* */

@Data
public class BusinessException extends RuntimeException{

    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult){
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }
}
